﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TEST421._2
{



    class Employee
    {
        protected string Name;
        protected decimal YearMoney { get; set; }
        public void Salary()
        {
            Console.WriteLine("职位：{0}\n年薪：{1}",Name,YearMoney);
        }
    }
 //组长： 月薪+1000*年限
    class Leader : Employee
    {
        public int year;
        public decimal monthMoney;

        public void Calculate()
        {
            Name = "组长";
            YearMoney = 12 * (monthMoney + 1000 * year);
        }
    }
    //经理 ：月薪+1000* 年限* 字段：基础分红1000
    class Manager : Employee
    {
        public int year;
        public decimal monthMoney;
        public decimal dividend = 1000;
        public void Calculate()
        {
            Name = "经理";
            YearMoney = 12 * (monthMoney + 1000 * year + dividend);
        }
    }
    //客户经理：月薪+1000* 年限+分红(基础分红*3)
    class AM : Employee
    {
        public int year;
        public decimal monthMoney;
        public decimal dividend = 1000;
        public void Calculate()
        {
            Name = "客户经理";
            YearMoney = 12 * (monthMoney + 1000 * year + dividend*3);
        }
    }

}
